﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;

namespace GazpromTestProject
{
    public static class DbApi
    {

        public static int RunTestQueries(string ConnectionString, string sQuery)
        {
            using (SqlConnection sqlCon = new SqlConnection(ConnectionString))
            {
                SqlCommand sqlCommand = new SqlCommand(sQuery, sqlCon);
                sqlCommand.CommandType = CommandType.Text;

                sqlCon.Open();
                return sqlCommand.ExecuteNonQuery();                
            }
        }

    
    }
}
